/*
 * author      : 吴中勤 
 * date        : 2018/8/17
 * description : moby order - sap order映射关系
 */

package com.deepexi.adapter.converter.sap.order;

import java.util.Date;

public class SapAdapterOrderLine {

    private String mobyOrderId;
    private String mobyLineId;
    private String sapLineNo;

    /** moby product type */
    private String productType;

    /** sap item catalog */
    private String itCat;

    /** 状态: stock_out = 出库状态 */
    private String status;

    /** 物料号 */
    private String materialNo;

    /** TODO 采购标志, X代表传递了采购, Xfail=采购但是SAP采购失败 */
    private String purchaseFlag;

    /** 金额 */
    private String price;

    /** 此单实付金额, 因为赠送价格会归0 */
    private String payPrice;

    /** 数量 */
    private int quantity;

    /**
     * 同步类型
     * synced = moby-sap已同步, 典型场景
     * gen-synced = moby中没有, 但是分离来出来, 并同步到sap. 如车辆购置税/赠送保养包虚料
     * sync-on-cond = 需要同步, 但未达到同步条件. 如金融, 贷款在未确定状态
     * retain = moby中有, 但是adapter做了拦截, 不同步到sap. 如保养订单详情
     */
    private String syncType;

    /** 预留字段 */
    private String field01;
    private String field02;
    private Long field11;
    private Long field12;

    private int id;
    private Date updatedAt;
    private Date createdAt = new Date();

    public void setQuantity(String quantity) {
        this.quantity = Integer.parseInt(quantity);
    }

    // === setter & getter ====

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(String payPrice) {
        this.payPrice = payPrice;
    }

    public String getPurchaseFlag() {
        return purchaseFlag;
    }

    public void setPurchaseFlag(String purchaseFlag) {
        this.purchaseFlag = purchaseFlag;
    }

    public String getSyncType() {
        return syncType;
    }

    public void setSyncType(String syncType) {
        this.syncType = syncType;
    }

    public String getMaterialNo() {
        return materialNo;
    }

    public void setMaterialNo(String materialNo) {
        this.materialNo = materialNo;
    }

    public String getItCat() {
        return itCat;
    }

    public void setItCat(String itCat) {
        this.itCat = itCat;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getField01() {
        return field01;
    }

    public void setField01(String field01) {
        this.field01 = field01;
    }

    public String getField02() {
        return field02;
    }

    public void setField02(String field02) {
        this.field02 = field02;
    }

    public Long getField11() {
        return field11;
    }

    public void setField11(Long field11) {
        this.field11 = field11;
    }

    public Long getField12() {
        return field12;
    }

    public void setField12(Long field12) {
        this.field12 = field12;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getMobyOrderId() {
        return mobyOrderId;
    }

    public void setMobyOrderId(String mobyOrderId) {
        this.mobyOrderId = mobyOrderId;
    }

    public String getMobyLineId() {
        return mobyLineId;
    }

    public void setMobyLineId(String mobyLineId) {
        this.mobyLineId = mobyLineId;
    }

    public String getSapLineNo() {
        return sapLineNo;
    }

    public void setSapLineNo(String sapLineNo) {
        this.sapLineNo = sapLineNo;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
}
